﻿@model BillBox.Models.Subscriber

@{
    ViewBag.Title = "New Subscriber";
    Layout = "~/Views/Shared/_Layout.cshtml";

    var Parishes = ViewBag.Parishes as IEnumerable<BillBox.Models.Parish>;
}


<div class="row main">
    <div class="col-lg-12">
        <ol class="breadcrumb">
            <li>@Html.ActionLink("Home", "Index", "Default")</li>
            <li>@Html.ActionLink("Subscribers", "Index", "Subscriber")</li>
            <li class="active">Create</li>
        </ol>
        <!--<h1 class="page-header">Create Agent</h1>-->
        <div class="panel panel-default">
            <div class="panel-heading">
                Subscriber Information
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-6">
                        @using (Html.BeginForm("Create", "Subscriber", FormMethod.Post, new { role = "form", @class = "form-horizontal" }))
                        {
                            @Html.AntiForgeryToken()
                            @Html.ValidationSummary(true)

                            <div class="form-group">
                                @Html.LabelFor(m => m.Name, new { @class = "col-sm-5 control-label" })
                                <div class="col-sm-7">
                                    @Html.TextBoxFor(m => m.Name, new { @class = "form-control" })
                                    @Html.ValidationMessageFor(m => m.Name)
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(model => model.OperatingName, new { @class = "col-sm-5 control-label" })
                                <div class="col-sm-7">
                                    @Html.TextBoxFor(model => model.OperatingName, new { @class = "form-control" })
                                    @Html.ValidationMessageFor(model => model.OperatingName)
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(m => m.AddressStreet, new { @class = "col-sm-5 control-label" })
                                <div class="col-sm-7">
                                    @Html.TextBoxFor(m => m.AddressStreet, new { @class = "form-control" })
                                    @Html.ValidationMessageFor(m => m.AddressStreet)
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(m => m.AddressCity, new { @class = "col-sm-5 control-label" })
                                <div class="col-sm-7">
                                    @Html.TextBoxFor(m => m.AddressCity, new { @class = "form-control" })
                                    @Html.ValidationMessageFor(m => m.AddressCity)
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(m => m.ParishId, "Parish", new { @class = "col-sm-5 control-label" })
                                <div class="col-sm-7">
                                    @Html.DropDownListFor(m => m.ParishId, new SelectList(Parishes, "ParishId", "Name"), "Select Parish", new { @class = "form-control" })
                                    @Html.ValidationMessageFor(m => m.ParishId)
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(m => m.ContactNumber, new { @class = "col-sm-5 control-label" })
                                <div class="col-sm-7">
                                    @Html.TextBoxFor(m => m.ContactNumber, new { @class = "form-control" })
                                    @Html.ValidationMessageFor(m => m.ContactNumber)
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(m => m.FaxNumber, new { @class = "col-sm-5 control-label" })
                                <div class="col-sm-7">
                                    @Html.TextBoxFor(m => m.FaxNumber, new { @class = "form-control" })
                                    @Html.ValidationMessageFor(m => m.FaxNumber)
                                </div>
                            </div>
                            <div class="form-group">
                                @Html.LabelFor(m => m.EmailAddress, new { @class = "col-sm-5 control-label" })
                                <div class="col-sm-7">
                                    @Html.TextBoxFor(m => m.EmailAddress, new { @class = "form-control" })
                                    @Html.ValidationMessageFor(m => m.EmailAddress)
                                </div>
                            </div>
                        
                            <div class="form-group">
                                @Html.LabelFor(model => model.Website, new { @class = "col-sm-5 control-label" })
                                <div class="col-sm-7">
                                    @Html.TextBoxFor(model => model.Website, new { @class = "form-control" })
                                    @Html.ValidationMessageFor(model => model.Website)
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-sm-offset-5 col-sm-7">
                                    <button type="submit" class="btn btn-default">Save</button>
                                </div>
                            </div>
                        }
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
